/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entityBeans;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author allankv
 */
@Entity
@Table(name = "typestatus")
@NamedQueries({
    @NamedQuery(name = "Typestatus.findAll", query = "SELECT t FROM Typestatus t"),
    @NamedQuery(name = "Typestatus.findByIdtypestatus", query = "SELECT t FROM Typestatus t WHERE t.idtypestatus = :idtypestatus"),
    @NamedQuery(name = "Typestatus.findByTypestatus", query = "SELECT t FROM Typestatus t WHERE t.typestatus = :typestatus")})
public class Typestatus implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idtypestatus")
    private Integer idtypestatus;
    @Column(name = "typestatus")
    private String typestatus;
    @ManyToMany(mappedBy = "typestatusList", fetch = FetchType.LAZY)
    private List<Identificationelement> identificationelementList;
    @ManyToMany(mappedBy = "typestatusList", fetch = FetchType.LAZY)
    private List<Curatorialelement> curatorialelementList;

    public Typestatus() {
    }

    public Typestatus(Integer idtypestatus) {
        this.idtypestatus = idtypestatus;
    }

    public Integer getIdtypestatus() {
        return idtypestatus;
    }

    public void setIdtypestatus(Integer idtypestatus) {
        this.idtypestatus = idtypestatus;
    }

    public String getTypestatus() {
        return typestatus;
    }

    public void setTypestatus(String typestatus) {
        this.typestatus = typestatus;
    }

    public List<Identificationelement> getIdentificationelementList() {
        return identificationelementList;
    }

    public void setIdentificationelementList(List<Identificationelement> identificationelementList) {
        this.identificationelementList = identificationelementList;
    }

    public List<Curatorialelement> getCuratorialelementList() {
        return curatorialelementList;
    }

    public void setCuratorialelementList(List<Curatorialelement> curatorialelementList) {
        this.curatorialelementList = curatorialelementList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idtypestatus != null ? idtypestatus.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Typestatus)) {
            return false;
        }
        Typestatus other = (Typestatus) object;
        if ((this.idtypestatus == null && other.idtypestatus != null) || (this.idtypestatus != null && !this.idtypestatus.equals(other.idtypestatus))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityBeans.Typestatus[idtypestatus=" + idtypestatus + "]";
    }

}
